import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Member from '../views/Member.vue'
import Search from '../views/Search.vue'
import ShopCar from '../views/ShopCar.vue'
import NewList from '../views/New/NewList.vue'
import goodsList from '../views/goods/goodsList.vue'
import photoList from '../views/photo/photoList.vue'
import NewDatail from '../views/New/NewDatail.vue'
import photoDatail from '../views/photo/photoDatail.vue'
import goodsDatail from '../views/goods/goodsDatail.vue'
import goodscomments from '../views/goods/goodscomment.vue'
import goodsdesc from '../views/goods/goodsdesc.vue'
import addgoods from '../views/goods/addgoods.vue'
Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/home' },
  { path: '/home', component: Home },
  { path: '/member', component: Member },
  { path: '/search', component: Search },
  { path: '/shopcar', component: ShopCar },
  { path: '/newslist', component: NewList },
  { path: '/news/detail/:id', component: NewDatail },
  { path: '/photo/list', component: photoList },
  { path: '/photo/Info/:id', component: photoDatail },
  { path: '/goods/list', component: goodsList },
  { path: '/goods/detail/:id', component: goodsDatail },
  { path: '/goodscomments/:id', component: goodscomments },
  { path: '/goodsdesc/:id', component: goodsdesc },
  { path: '/addgoods', component: addgoods }
]

const router = new VueRouter({
  routes
})

export default router
